; <AUT2EXE VERSION: 3.2.0.1>

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: C:\Users\sysadmin\Desktop\jpg-open-with.au3>
; ----------------------------------------------------------------------------

If FileExists("C:\Windows\System32\oobe\msoobe.jpg") Then
;    MsgBox(4096, "", "Vista Machine")
	BlockInput ( 1 )

		Run ( "C:\windows\Explorer /select,C:\Windows\System32\oobe\msoobe.jpg" , "C:\Windows\System32\oobe\" , @SW_MAXIMIZE )

		WinWaitActive ( "oobe" )
		Sleep(1000)
		ControlSend ( "oobe", "", "", "!f" )
		Sleep(1000)
		ControlSend ( "oobe", "", "", "{UP}{UP}{ENTER}" )

		WinWaitActive ( "msoobe.jpg Properties" )
		ControlClick ( "msoobe.jpg Properties", "", "Button1" )
;		WinSetState ( "C:\WINDOWS\system32\oobe", "", @SW_MINIMIZE )



	;MsgBox(4128, "Verify ""Open With"" Setting", "Verify the JPG file is set to ""Open With"" the Microsoft Photo Editor application.  Once finished, click [OK] in the ""Open With"" window.")
	SplashTextOn("Verify ""Open With"" Setting", "Verify the JPG file is set to ""Open With"" the Microsoft Photo Editor application.  Once finished, click [OK] in the ""Open With"" window.", 500, 50, -1, -1, 4, "", 8)
	Sleep(10000)
	SplashOff()

	BlockInput ( 0 )

	;WinWaitActive ( "Verify Open With Setting" )
	;WinMove ( "Verify Open With Setting","", 50, 50 )
	WinWaitClose ( "Open With" )

	WinActivate ( "msoobe.jpg Properties" )
	WinWaitActive ( "msoobe.jpg Properties" )
	ControlClick ( "msoobe.jpg Properties", "", "Button5" )

	WinActivate ( "oobe" )
	WinWaitActive ( "oobe" )
	WinClose ( "oobe" )

	;MsgBox(32, "DEBUG", "Configured with user help.")
Else
    MsgBox(16,"MS Vista not Detected", "Did not detect a MS Vista machine by checking for the C:\Windows\System32\oobe\msoobe.jpg file.  Installation will fail.  For help please visit the ""Resize Thingy"" project on sourceforge.net.")
EndIf



; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: C:\Users\sysadmin\Desktop\jpg-open-with.au3>
; ----------------------------------------------------------------------------

